import request from '@/utils/request'

export function createRole (role) {
  return request({
    url: '/role/insertRole',
    method: 'post',
    data:role
  })
}

export function findRole (param) {
    return request({
        url:'/role/searchRole',
        method:'post',
        data:param
    })
}

export function updateRole (role) {
  return request({
    url: '/role/updateRole',
    method: 'post',
    data:role
  })
}

export function deleteRole (param) {
  return request({
    url:'/role/deleteRole',
    method:'post',
    data:param
  })
}

export function findResourceTree() {
  return request({
    url:'/admin/sysResource/findResourceTree',
    method:'get'
  })
}

export function findRoleAll() {
  return request({
    url:'/role/findRoleAll',
    method:'get'
  })
}

export function findResourceIdList(param) {
  return request({
    url:'/admin/sysResource/findResourceIdList',
    method:'post',
    data:param
  })
}

export function findUserRole(param) {
  return request({
    url:'/role/findUserRole',
    method:'post',
    data:param
  })
}

